#!/usr/bin/python
#coding:utf-8

from xml.dom import minidom;
import sys;


def resolveXml(xml="s.xml"):
    
    docu = minidom.parse(xml);
    root = docu.documentElement;    
    print root.nodeName;
    print dir(root);
    #print root.childNodes;
    maclist = root.getElementsByTagName("mac");
    
    if not maclist:
        return;
    else:
        for i in range(len(maclist)):
            mac = maclist[i];
            print mac.nodeName;
            mab = mac.attributes;            
            print type(mab),mab["address"].value;
    
    pass

def Main(argv):
    
    resolveXml();
    
    pass

if(__name__=="__main__"):
    
    Main(sys.argv);
    
    pass